#ifndef FILE_H
#define FILE_H

#include <string>
#include <fstream>
#include <sstream>

#include "types.h"

//Class to contain file operations and data used for file processing.
class File
{
    public:
        //constructor. Set file path.
        File(std::string filePath);

        //destructor. Make sure file is closed.
        ~File();

        //Read file contents to RAM.
        bool ReadToRam();

        //Get address of itsFileBufferSS.
        std::stringstream* GetPtrToFileBufferSS();

    private:
        //Open file.
        bool Open();

        //Close file.
        void Close();

        //file path string.
        std::string itsFilePath;

        //stringstream for easy processing of file contents.
        std::stringstream itsFileBufferSS;

        //File handle
        std::fstream itsFile;

        //Guess..
        UINT itsFileSize;
};

#endif // FILE_H
